# 12.求出1-2+3-4+5-6...+99-100的结果
a = 1
sum1 = 0
while a <= 100:
    if a % 2 != 0:
        sum1 += a
    else:
        sum1 -= a
    a += 1
print(sum1)
